{include="header"}
{include="navigator"}

<div id = "container">
	<h1 class = "header">จัดการข้อมูลผู้ใช้งานระบบ</h1>

	<form action = '{$action}' method = 'post' enctype='multipart/form-data' id = "admin-form">
		<input type = "hidden" name = "uid" value = "{$uid}">
		<ul class = 'form'>
			<li class = 'node'>
				<label for='username' class = 'label'>ชื่อผู้ใช้งาน : </label>
				<input type = 'text' id = 'username' class = 'input validate[required] text-input w200' name = 'username' value = "{$admin['username']}">
				<span class='require'>*</span>
				<span class = 'desc'></span>
			</li>
			<li class = 'node'>
				<label for='password' class = 'label'>รหัสผ่าน : </label>
				<input type = 'password' id = 'password' class = 'input validate[required] text-input w200' name = 'password' value = "{$admin['password']}">
				<span class='require'>*</span>
				<span class = 'desc'></span>
			</li>
			<li class = 'node'>
				<label for='name' class = 'label'>ชื่อ นามสกุล : </label>
				<input type = 'text' id = 'name' class = 'input validate[required] text-input w200' name = 'name' value = "{$admin['name']}">
				<span class='require'>*</span>
				<span class = 'desc'></span>
			</li>
			<li class = 'node'>
				<label for='level_name' class = 'label'>ตำแหน่ง : </label>
				<select name = 'level_name'>
					<option value = 'admin' {if="$admin['level_name']=='admin'"}selected{/if}>Admin</option>
					<option value = 'board' {if="$admin['level_name']=='board'"}selected{/if}>Board</option>
					<option value = 'officer' {if="$admin['level_name']=='officer'"}selected{/if}>Officer</option>
					<option value = 'assessor' {if="$admin['level_name']=='assessor'"}selected{/if}>Assessor</option>
				</select>
				<span class = 'desc'></span>
			</li>
			<li class = 'node'>
				<label for='tel' class = 'label'>เบอร์โทรศัพท์ : </label>
				<input type = 'text' id = 'tel' class = 'input w200' name = 'tel' value = "{$admin['tel']}">
			</li>
			<li class = 'node'>
				<label for='email' class = 'label'>อีเมลล์ : </label>
				<input type = 'text' id = 'email' class = 'input w200' name = 'email' value = "{$admin['email']}">
			</li>
			<li>
				<input type = 'submit' value = ' ตกลง ' class = 'submit'>
				<input type = 'button' value = ' ยกเลิก ' class = 'submit' onclick = "location.href='admin.php'">
			</li>
		</ul>
	</form>
</div>

{include="footer"}